/*
 * UMLSynch plugin for Eclipse
 * http://umlsynch.googlecode.com
 *
 * Copyright 2008-2010, Evgeny Alexeyev
 * Licensed under the EPL - v1.0
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */

package com.googlecode.umlsynch.dialogs;

import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

public class ListChecker2 implements Runnable {
	public String[] filesList;
	public String[] namesList;
	public String[] selFilesList;
	public String[] selNamesList;
	
	public void run(){
		IWorkbenchPage page = null;

		IWorkbenchWindow awin = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		if (awin == null) {
			awin = PlatformUI.getWorkbench().getWorkbenchWindows()[0];
		}
		if (awin != null) {
		    IWorkbenchPage pg = awin.getActivePage();

			FilesSelectDialog fopd = new FilesSelectDialog(awin.getShell());

			fopd.setFileList(filesList);
			fopd.setNameList(namesList);
			fopd.open();
			selFilesList = fopd.getSelectedFileList();
			selNamesList = fopd.getSelectedNameList();
		}

	}
};
